#ifndef __W25QXX_H__
#define __W25QXX_H__

#include <string.h>

#include "heap.h"
#include "ipc.h"
#include "device.h"

#include "spi_bus.h"

#ifdef __cplusplus
extern "C" {
#endif

#define W25Q_MAGIC 0x57323551

typedef struct{
    mt_spi_client_t parent;
    mt_uint8_t      *buffer;
    mt_uint32_t     memory_size;
    mt_uint32_t     addr_lenght;
}w25qxx_t;


mt_err_t w25qxx_register(mt_uint32_t memory_size, 
                         mt_uint32_t cs_pin, 
                         const char  *w25q_name, 
                         const char  *bus_name);

#ifdef __cplusplus
}
#endif

#endif
